package com.csx.springcloud.invoke.openfeign.consumer.overideFeignDefaults.conf;

/**
 * <p> what does this class do ? </p>
 * {@link com.csx.springcloud.invoke.openfeign.consumer.overideFeignDefaults.client.OverridingFeignClient}
 * <p> How does it work ?</p>
 * <p> Why does it do this ?</p>
 *
 * @author cuisongxu
 * @date 2023/8/8 周二 16:20
 */

import feign.Contract;
import feign.auth.BasicAuthRequestInterceptor;
import org.springframework.context.annotation.Bean;

/**
 * 注意: 该类不应该标注 {@link org.springframework.context.annotation.Configuration},
 * 否则会成为其他客户端的默认组件源
 */
public class FooConfiguration {

    @Bean
    public Contract feignContract() {
        return new feign.Contract.Default();
    }

    @Bean
    public BasicAuthRequestInterceptor basicAuthRequestInterceptor() {
        return new BasicAuthRequestInterceptor("user", "password");
    }

}
